package com.zking.dao.mapper;

import com.zking.dao.domain.SysRole;
import com.zking.dao.domain.SysUser;

import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SysUserMapper extends Mapper<SysUser> {

    @Select("select * from sys_user where user_name=#{userName}")
    @ResultMap("BaseResultMap")
    SysUser findUserByUsername(SysUser sysUser);

    @Update("update sys_user set user_enable = #{userEnable} where id=#{userId}")
    @ResultMap("BaseResultMap")
    boolean updateUserByLock(Integer userId, Integer userEnable);
}